import { ref } from 'vue'
import { defineStore } from 'pinia'

export const useCommonStore = defineStore('common', () => {
  const isNameHide = ref(false)
  const setIsNameHide = () => {
    isNameHide.value = !isNameHide.value
  }
  const isSearchHide = ref(false)
  const setIsSearchHide = () => {
    isSearchHide.value = !isSearchHide.value
  }
  const institutionId = ref()
  const setInstitutionId = (e: number) => {
    institutionId.value = e
  }
  return {
    isNameHide,
    setIsNameHide,
    isSearchHide,
    setIsSearchHide,
    institutionId,
    setInstitutionId
  }
})
